import request from '@/utils/request';
import { loginFormData, loginResponse, userInfoReponseData } from './type';

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}

export const reqLogin = (data: loginFormData) => {
  return request.post<any, loginResponse>(API.LOGIN_URL, data);
};

export const reqUserInfo = () => {
  return request.get<any, userInfoReponseData>(API.USERINFO_URL);
};
